﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery表情输入框插件</title>
<link href="css/jquery.face.css" type="text/css" rel="stylesheet">
<script src="jquery-1.12.0.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.face.js" charset="utf-8"></script>
</head>
<body>
<div id="Smohan_FaceBox">
  <textarea name="text" id="Smohan_text" class="smohan_text"></textarea>
  <p> <a href="javascript:void(0)" class="face" title="表情"></a>
    <button class="button" id="Smohan_Showface">显示表情</button>
  </p>
</div>
<!--/表情盒子-->
<!--解析表情-->
<div id="Zones"></div>
<!--/DEMO-->
<script type="text/javascript">
$(function (){
	$("a.face").smohanfacebox({
		Event : "click",	//触发事件	
		divid : "Smohan_FaceBox", //外层DIV ID
		textid : "Smohan_text" //文本框 ID
	});
	//解析表情  $('#Zones').replaceface($('#Zones').html());
});
//Demo测试
$('#Smohan_Showface').click(function() {
	 $('#Zones').fadeIn(360);
	 $('#Zones').html($('#Smohan_text').val());
	 $('#Zones').replaceface($('#Zones').html());//替换表情
	});
</script>
</body>
</html>
